package com.project.bean;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

/**
 * 员工实体类
 */
public class EmployeeBean {
    /**编号*/
    private Integer id;
    /**姓名*/
    @NotBlank(message = "姓名必须填写")
    @Pattern(regexp = "[a-zA-Z\\u4e00-\\u9fa5]{2,}",message = "姓名必须为两个以上的汉字或字母")
    private String name;
    /**电话*/
    @Pattern(regexp = "1[35789]\\d{9}",message = "电话必须以13、15、17、18、19开始的11位数")
    private String phone;
    /**工资*/
    @Max(value = 100000,message = "工资不能高于10万")
    @Min(value = 1800,message = "工资不能低于1800")
    private Integer money;
    /**头像*/
    private String imgPath;
    /**状态*/
    private String status = "在职";

    public EmployeeBean(String name, String phone, Integer money, String imgPath) {
        this.name = name;
        this.phone = phone;
        this.money = money;
        this.imgPath = imgPath;
    }

    public EmployeeBean() {
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public Integer getMoney() {
        return money;
    }

    public void setMoney(Integer money) {
        this.money = money;
    }

    public String getImgPath() {
        return imgPath;
    }

    public void setImgPath(String imgPath) {
        this.imgPath = imgPath;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    @Override
    public String toString() {
        return "EmployeeBean{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", phone='" + phone + '\'' +
                ", money=" + money +
                ", imgPath='" + imgPath + '\'' +
                ", status='" + status + '\'' +
                '}';
    }
}
